|
HSL 2.0 Framework
Description of the framework
|
HTTP response. More..
Public Member Functions | |
| def | __init__ (self) |
| Constructor. More... | |
| def | set_status_code (self, code, text=None) |
| Sets the status code and optionally the status text. More... | |
| def | set_header (self, key, value) |
| Sets a header. More... | |
| def | set_body (self, data) |
| Sets the body of the answer. More... | |
Private Member Functions | |
| def | _clear (self) |
| Removes all references | |
HTTP Response
This encapsulates all parameters that the HTTP server replies to the remote terminal. For details on the procedure and use of this class, refer to HTTP Server
| def hsl20_4_http_server.hsl20_4_http_server.Response.__init__ | ( | self | ) |
Constructor
| def hsl20_4_http_server.hsl20_4_http_server.Response.set_body | ( | self, | |
| data | |||
| ) |
Sets the body of the answer
The data assigned here is the actual response to the query
| data | string Data |
| def hsl20_4_http_server.hsl20_4_http_server.Response.set_header | ( | self, | |
| key, | |||
| value | |||
| ) |
Sets a header
| key | string Key |
| value | string Value |
| def hsl20_4_http_server.hsl20_4_http_server.Response.set_status_code | ( | self, | |
| code, | |||
text = None |
|||
| ) |
1.8.13